import { ref } from 'vue'
export const statusOptions = [
    {
        label: '待支付',
        value: 1,
        elTagClass: 'info',
    },
    {
        label: '等待中',
        value: 2,
        elTagClass: 'warning',
    },
    {
        label: '待出票',
        value: 3,
        elTagClass: 'primary',
    },
    {
        label: '已出票',
        value: 4,
        elTagClass: 'success',
    },
    {
        label: '已取消',
        value: 5,
        elTagClass: 'danger',
    },
]

export const searchFormRules = ref([
    {
        type: 'input',
        props: {
            label: '名称',
            prop: 'name',
            placeholder: '请输入名称',
        },
    },
    {
        type: 'select',
        props: {
            label: '项目名称',
            prop: 'projectId',
            placeholder: '请选择项目名称',
        },
    },
    {
        type: 'select',
        props: {
            label: '状态',
            prop: 'status',
            placeholder: '请选择状态',
        },
        options: statusOptions,
    },
])

export const tableHead = [
    {
        type: 'selection',
    },
    {
        label: '分组',
        prop: 'group',
        width: 60,
    },
    {
        type: 'slot:name',
        label: '姓名',
        prop: 'touristList',
        width: 180,
        // 'show-overflow-tooltip': true,
    },
    // {
    //     label: '场地',
    //     prop: 'placeName',
    //     'show-overflow-tooltip': true,
    // },
    {
        label: '订单号',
        prop: 'orderNo',
        'show-overflow-tooltip': true,
    },
    {
        label: '项目名称',
        prop: 'projectName',
        'show-overflow-tooltip': true,
        width: '180',
    },
    {
        type: 'slot:status',
        label: '状态',
        prop: 'status',
    },
    {
        type: 'date',
        label: '出票时间',
        prop: 'outTicketTime',
        'min-width': 150,
    },
    {
        type: 'date',
        label: '购票日期',
        prop: 'buyDate',
        'min-width': 150,
    },
    {
        type: 'slot:image',
        label: '支付二维码',
        prop: 'payUrl',
        width: 180,
    },
    {
        type: 'date',
        label: '上传时间',
        prop: 'createdAt',
        'min-width': 140,
        'show-overflow-tooltip': true,
    },
    {
        type: 'actionBar',
        label: '操作',
        width: 200,
        data: [
            {
                text: '删除',
                props: {
                    icon: 'Delete',
                },
            },
            // {
            //     text: '下载',
            //     props: {
            //         icon: 'Download',
            //     },
            // },
        ],
    },
]
